package com.xuecheng.learning.agent;

import com.xuecheng.api.learning.model.vo.ResourceUrlModel;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Feign远程调用
 */
@FeignClient(value = XcFeignServiceNameList.XC_MEDIA_SERVICE)
public interface MediaApiAgent {

    /**
     * 根据媒资ID获取播放地址--远程调用
     * @param mediaId
     * @return
     */
    @GetMapping("media/l/media-url/{mediaId}")
    public RestResponse<ResourceUrlModel> getMediaUrl(@PathVariable Long mediaId);
}
